package com.ihr360.expr.core;

import com.ihr360.expr.ExprException;

public class ExprTypes
{
    public static void assertType(Expr value, ExprType... types)
            throws ExprException {
        for (ExprType t : types) {
            if (t.equals(value.type)){
                return;
            }
        }
        throw new ExprException("Unexpected type: " + value.type);
    }
}
